﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Miris.HumanMilkAnalyser.DataModel;

namespace Miris.HumanMilkAnalyser.Service.Interface
{
    public interface IPatientService : IService<Patient>
    {
        /// <summary>
        /// Get the generated patient number based on configured rule.
        /// </summary>
        /// <returns>The generated patient number meets configured rule.</returns>
        string GetPatientNumber();

        /// <summary>
        /// Query the matched Patient data with the provided Patient & AnalysisResult info.
        /// </summary>
        /// <param name="patient">The provided Patient contains the data field used to search. For example, the Number property.</param>
        /// <param name="analysisResult">The provided AnalysisResult contains the data field used to search. For example, the SampleNumber property.</param>
        /// <param name="selectedStartDate">The selected start date used to identify the AnalysisResult happened after the specific date.</param>
        /// <param name="selectedEndDate">The selected start date used to identify the AnalysisResult happened before the specific date.</param>
        /// <returns>The matched Patient data list.</returns>
        IList<Patient> Query(Patient patient, AnalysisResult analysisResult, DateTime? selectedStartDate, DateTime? selectedEndDate);

        /// <summary>
        /// Get all patient data and all related analysis results.
        /// </summary>
        /// <returns></returns>
        IList<Patient> GetAllWithAnalysisResults();
    }
}
